Skip to content

use Plotly axis titles if not facetted #573

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

timelyportfolio
Copy link
Collaborator

As reported in #510, axis titles can be positioned improperly depending on the size of the plot. In a2aedac, axis titles were changed to annotations, so they are not duplicated and work much more similarly to ggplot2. Unfortunately, plotly annotations are positioned based on a [0,1] scale with respect to the plot area. This means the axis titles scale inversely and negatively to the plot size. When the plot is small, the x axis title will be placed too high. When the plot is large/high, the x axis title moves too far down sometimes out of the svg bounding box.

This pull changes to use plotly axis titles when the plot is not facetted. When the plot is facetted, the plotly axis titles are changed to "" in favor of the annotation approach.

@cpsievert
Copy link
Collaborator

Thanks, this is a great start. Would you mind starting this same pull request from the ropensci remote?

@timelyportfolio
Copy link
Collaborator Author

close in favor of #574 from ropensci remote

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants